package com.itheima.jobs;


import com.alibaba.dubbo.config.annotation.Reference;
import com.itheima.service.OrderService;
import com.itheima.service.OrderSettingService;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

/**
 * @author:swx
 * @description定时清理预约设置数据
 * @date 2019/12/13
 */
public class ClearOrderSettingJob {
@Reference
   private OrderSettingService orderSettingService;
    public void clearOrderSetting(){
        Date date = new Date();
        String format = new SimpleDateFormat("yyyy-MM-dd").format(date);
        orderSettingService.deleteByDate(format);
    }

}
